package com.miao.im.support.util;

import com.miao.im.support.page.Page;

/**
 * @Auther: miaoguoxin
 * @Date: 2020/6/19 14:51
 * @Description:
 */
public class PageUtil {

    public static <T> Page<T> copyPage(Page<?> page, T result) {
        Page<T> pageOutput = new Page<>(page.getPageNumber(), page.getPageSize());
        pageOutput.setTotalCount(page.getTotalCount());
        pageOutput.setData(result);
        return pageOutput;
    }
}
